package me.jiatao.wan.data.database

import androidx.room.Database
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import me.jiatao.wan.data.database.dao.ArticleDao
import me.jiatao.wan.data.database.dao.BannerDao
import me.jiatao.wan.data.database.dao.RemoteKeysDao
import me.jiatao.wan.data.database.entity.ArticleEntity
import me.jiatao.wan.data.database.entity.BannerEntity
import me.jiatao.wan.data.database.entity.RemoteKeysEntity

/**
 * @Author: taojia
 * @CreateDate: 2021/8/24 4:02 下午
 * @Version: 1.0
 * @Description:
 */
@Database(
    entities = [RemoteKeysEntity::class,
        BannerEntity::class,
        ArticleEntity::class],
    version = 1,
    /** 需要在gradle配置Schema路径 */
    exportSchema = true
)
@TypeConverters(value = [RoomTypeConverter::class])
abstract class AppDataBase : RoomDatabase() {
    abstract fun remoteKeysDao(): RemoteKeysDao
    abstract fun articleDao(): ArticleDao
    abstract fun bannerDao(): BannerDao
}